package exo1;

public abstract class Compte {
	
	private String nom;
	private int numero;
	private double solde;
	
	public Compte(String nom, int numero, double solde)
	{
		this.nom = nom;
		this.numero = numero;
		this.solde = solde;
	}
	public String getNom()
	{
		return this.nom;
	}
	public int getNumero()
	{
		return this.numero;
	}
	public void setSolde(double solde)
	{
		this.solde = solde;
	}
	public double getSolde()
	{
		return this.solde;
	}
	@Override
	public String toString(){
		return "Compte de "+this.getNom()+" numero "+this.getNumero()+"\nSolde actuel = "+this.getSolde()+"\n";
	}
	
	abstract public boolean crediterCompte(double montant);
	abstract public boolean debiterCompte(double montant);
}
